<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration {
    public function up()
    {
        /**
         * 景区门票
         */
        Schema::create('scenic_spot_goods', function (Blueprint $table) {
            $table->id();
            $table->string('scenic_id', 32)->comment('系统生成,景点id');
            $table->string('ticket_id',32)->comment('系统生成,门票id');
            $table->string('ticket_name',64)->comment('产品名称');
            $table->tinyInteger('ticket_delivery')->comment('取票方式  1实体票(不做订购,仅展示)  8预付电子票 ');
            $table->tinyInteger('ticket_type')->comment('门票分类:0特惠;1成人票;2亲子家庭票;3学生票;4儿童票;5老人票  6特殊人群优待票;7套票;8联票;9园内餐饮;10园内交通;11园内其他票  12园内演出');
            $table->integer('advance_day')->comment('预订截止天数');
            $table->integer('advance_hour')->comment('预订截止小时数 表示几点钟');
            $table->integer('min_num')->comment('起订张数');
            $table->integer('max_num')->comment('最多预订张数');
            $table->integer('identity_type')->comment('证件类型 1 身份证 2 护照 4军官证 8 港澳 16 台胞  目前仅支持身份证 1 ');
            $table->integer('passenger_limit')->comment('预订项要求 1-7');
            $table->string('refund_rule')->comment('退改规则');
            $table->tinyInteger('refund_type')->comment('从退改规则提取 1 随时退 2 有条件退');
            $table->text('book_notice')->comment('预订须知');
            $table->timestamps();
        });
    }

    public function down()
    {
        Schema::dropIfExists('scenic_spot_goods');
    }
};
